﻿<div>
    <div class="form-group">
        <div class="checkbox">
            <label>
                <input type="checkbox" v-model="fieldInfo.IsRequired"/>
                必填？
            </label>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label">
            选项
        </label>
        <div class="control-group">
            <div style="margin-bottom:10px;" :class="{default:option.DefaultSelected}" v-for="option in fieldInfo.FieldOptions">
                <div>
                    <div class="input-group">
                        <input type="text" class="form-control" placeholder="输入选项内容" v-model="option.DisplayText">
                        <span class="input-group-addon dropdown">
                            <i class="glyphicon glyphicon-remove" @click="removeOption(fieldInfo.FieldOptions,option)" data-toggle="dropdown">
                            </i>
                        </span>
                    </div>
                </div>
                <div v-show="fieldInfo.ShowValue">
                    <input type="text" v-model="option.Value" />
                    <span class="add-on">
                        <i class="icon-bullhorn dropdown-toggle" data-toggle="dropdown"></i>
                        <code class="dropdown-menu alert alert-info">

                        </code>
                    </span>
                </div>
            </div>
        </div>
    </div>
    <input type="button" class="btn btn-default btn-xs" value="添加选项" @click="addOption(fieldInfo.FieldOptions)" />
</div>